package com.sc.VenusQueryBeta.contract.search;

import com.hengjun.kingstar.sdk.base.BasePresenter;
import com.hengjun.kingstar.sdk.base.IBaseActivity;
import com.hengjun.kingstar.sdk.base.IBaseModel;
import com.sc.VenusQueryBeta.model.bean.home.KeyWordListBean;
import com.sc.VenusQueryBeta.model.bean.home.SearchListBean;

import io.reactivex.Observable;

/**
 * 搜索框契约接口
 */

public interface SearchContract  {
    abstract class SearchPresenter extends BasePresenter<ISearchModel,ISearchView>{
        //获取首页轮播数据
        public abstract void getKeyWordList();

        //搜索
        public abstract void search(String keyWord);
    }
    interface ISearchModel extends IBaseModel {
        //获取首页轮播数据
        Observable<KeyWordListBean> getKeyWordList();

        //搜索
        Observable<SearchListBean> search(String keyWord);

    }
    interface ISearchView extends IBaseActivity{
        //顯示keyword列表
        void KeyWordListBeanDataSuccess(KeyWordListBean keyWordListBean);

        void showNetworkError();

        //搜索
        void getSearchDataSuccess(SearchListBean searchListBean);
    }
}
